package net.praysam.demo1.controller;

import net.praysam.demo1.pojo.Employee;
import net.praysam.demo1.service.EmployeeService;
import net.praysam.demo1.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class PositionController {
    @Autowired
    PositionService positionService;
    @RequestMapping("position")
    public String getEmployees(Model model){
    Employee emp1 = positionService.findpositionById(1);
    model.addAttribute("emp",emp1);


        positionService.findpositionById(0);

    // model.addAttribute("emplist",emplist);
    return "posMgr";//跳转至empMgr.html页面
    }
}
